﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<MvcEngineModelList<MvcEngine.Core.Content.Page>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>
        <%= this. Model.Localize("PagesPageTitle")%>
    </title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="page-title" id="pages-header">
         <h1><%= Model.Localize("PagesPageHeader")%></h1>
    </div>
    <div class="page-menu">
        <%= Html.UrlActionLink(Model.Localize("NewPageLink"), Url.NewPage())%>
    </div>
    <%= Html.Grid(Model.List).Columns(column =>
{
    column.For(x => Html.UrlActionLink(Html.Image(Url.ImagePath("edit.gif"), Model.Localize("EditAltText")), Url.EditPage(x.Id), false) +
    Html.PostActionLink(Html.Image(Url.ImagePath("delete.gif"), Model.Localize("DeleteAltText")), Url.DeletePage(x.Id), Html.DeleteConfirmDialog(), false) +
    Html.UrlActionLink(Html.Image(Url.ImagePath("view.gif"), Model.Localize("ViewAltText")), Url.PageTemplate(x.Id, "View"), false)
    /*Html.UrlActionLink(Html.Image(Url.ImagePath("up.gif"), Model.Localize("UpAltText")), Url.PageMoveUp(x.Id), false)+
    Html.UrlActionLink(Html.Image(Url.ImagePath("down.gif"), Model.Localize("DownAltText")), Url.PageMoveDown(x.Id), false)*/)
    .Header(Model.Localize("ActionsHeader")).Attributes(nowrap => "nowrap").DoNotEncode();
    column.For(x => x.Title).Header(Model.Localize("TitleHeader"));
    column.For(x => x.Description).Header(Model.Localize("DescriptionHeader"));
    column.For(x => x.Keywords).Header(Model.Localize("KeywordsHeader"));
    column.For(x => x.Visible).Header(Model.Localize("VisibleHeader"));
    column.For(x => x.CreatedDate).DoNotSplit().Header(Model.Localize("CreatedDateHeader")).Format("{0:d}");
    column.For(x => x.ModifiedDate).DoNotSplit().Header(Model.Localize("ModifiedDateHeader")).Format("{0:d}");
}).Attributes(cellSpacing => "0", cellPadding => "0", border => "0")
  .Footers(footer => 
  {
      footer.For(string.Format(Model.Localize("TotalItems"), Model.List.Count)).Attributes(colspan => "7");
  })%>
    
</asp:Content>
